Food producers and others often analyze the major constituents, such as sugar content and moisture, of certain agricultural products including sugar beets, grapes, and grapefruits. This analysis can be used for developing new hybrid species of crops. Moreover, with the advent of precision farming, it is desirable to obtain information relating to quality, such as sugar content, of an agricultural product being harvested along with yield (quantity) information. At present, technologies are available to determine the sugar content of sugar-containing agricultural products in laboratory conditions or in a processing plant. However, it is desirable to obtain quality information during harvesting in order to manage and plan crop production for consistent quality. Therefore, a need exists for a sensor with or without a harvester to operate in a field environment and which is also capable of determining sugar content in real-time, near real-time, or in a quick manner.